package com.project.forlearning.dao;

import com.project.forlearning.pojo.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface BackUserResourceMapper {

    //查询用户某一个收藏资源
    Resource findUserResource(@Param("resourceId") Integer resourceId, @Param("userId") Integer userId);

    //查询某个用户所有资源
    List<Resource> findUserAllResource(@Param("userId") Integer userId);

    //根据资源编号和用户id删除选中用户的收藏信息
    boolean deleteUserResource(@Param("resourceId") Integer resourceId,@Param("userId") Integer userId);
}
